var ws = new WebSocket("ws://10.36.140.110:9000");
ws.onopen = function(){
    ws.send("大家好！");
}
ws.onmessage = function(event){
    let chatroot = document.querySelector("#chatroom");
    chatroom.innerHTML += "<br/>"+event.data;
}
ws.onclose = function(){
    alert("Closed");
}
ws.onerror = function(err){
    alert("Error"+err);
}